package com.swg.cocobox.message.example;

import java.util.HashSet;
import java.util.Set;

import com.swg.cocobox.message.ClientInfo;
import com.swg.cocobox.message.ClientValidator;

public class MockClientValidator implements ClientValidator{
	
	private static Set<String> validUsernames;
	
	public MockClientValidator() {
		validUsernames=new HashSet<String>();
		validUsernames.add("user1");
		validUsernames.add("user2");
		validUsernames.add("user3");
	}

	@Override
	public boolean isValid(ClientInfo clientInfo) {
		if(!validUsernames.contains(clientInfo.getUsername())){
			return false;
		}
		return true;
	}

}
